const path = require("path");

const resolve = dir => {
    return path.join(__dirname, dir)
};

const BASE_URL = process.env.NODE_ENV === 'production' ? '/' : '/';

module.exports = {
    baseUrl: BASE_URL,
    lintOnSave: true,
    configureWebpack:{
        performance:{
            hints:false
        }
    },
    performance: {
        hints: 'warning', // 枚举 false关闭
        maxEntrypointSize: 50000000, //入口文件的最大体积，单位字节
        maxAssetSize: 30000000, //生成文件的最大体积，单位字节
        assetFilter: function(assetFilename) { //只给出js文件的性能提示
            return assetFilename.endsWith('.js');
        }
    },
    chainWebpack: config => {
        config.resolve.alias
            .set('@', resolve('src'))
            .set('_c', resolve('src/components'))
    },
    productionSourceMap: false,
    devServer: {
        //proxy: '192.168.18.250:80',
        proxy: '39.106.107.155:56700',
        changeOrigin: true
    }
};
